/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package serveur;

import java.net.Inet4Address;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

/**
 *
 * @author jfdenise
 */
public class Server {

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {

        try {
            Registry registry = LocateRegistry.createRegistry(1899);

            MonitoringImpl obj = new MonitoringImpl();
            // Bind this object instance to the name "HelloServer"
            registry.rebind(Inet4Address.getLocalHost().getHostAddress(), obj);
            System.out.println("HelloServer bound in registry "+Inet4Address.getLocalHost().getHostAddress());
        } catch (Exception e) {
            System.out.println("HelloImpl err: " + e.getMessage());
            e.printStackTrace();
        }
    }
}
